import java.util.Scanner;
//区分一下两个代码
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-04-09
 * Time: 17:38
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        System.out.println(Fibonacci(n));
    }
    public static int Fibonacci(int n){
        int arr[]=new int[n+1];
        arr[1]=1;
        arr[2]=2;

        for(int i=3;i<=n;i++){
            arr[i]=arr[i-1]+arr[i-2];
        }
        return  arr[n];
    }
}
